.class public Ldgb/e2;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field private static b:Ldgb/e2;


# instance fields
.field private a:Landroid/content/Context;


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Ldgb/e2;->a:Landroid/content/Context;

    return-void
.end method

.method public static a(Landroid/content/Context;)Ldgb/e2;
    .locals 1

    .line 1
    sget-object v0, Ldgb/e2;->b:Ldgb/e2;

    if-nez v0, :cond_0

    .line 2
    new-instance v0, Ldgb/e2;

    invoke-direct {v0, p0}, Ldgb/e2;-><init>(Landroid/content/Context;)V

    sput-object v0, Ldgb/e2;->b:Ldgb/e2;

    .line 3
    :cond_0
    sget-object p0, Ldgb/e2;->b:Ldgb/e2;

    return-object p0
.end method

.method private a(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;)V
    .locals 2

    .line 5
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v1, "application/vnd.android.package-archive"

    .line 6
    invoke-virtual {v0, p2, v1}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    const-string p2, "android.intent.extra.INSTALLER_PACKAGE_NAME"

    .line 7
    invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const/high16 p2, 0x10000000

    .line 8
    invoke-virtual {v0, p2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 9
    invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;Landroid/os/Handler;IZ)V
    .locals 0

    .line 4
    invoke-direct {p0, p1, p2, p3}, Ldgb/e2;->a(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;)V

    return-void
.end method

.method public a(Landroid/content/Context;Ljava/lang/String;Landroid/os/Handler;Z)Z
    .locals 0

    .line 10
    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p3

    if-eqz p3, :cond_1

    .line 11
    sget-boolean p1, Ldgb/o0;->c:Z

    if-eqz p1, :cond_0

    const-string p1, "param deletePackageName must not be null"

    .line 12
    invoke-static {p1}, Ldgb/s0;->c(Ljava/lang/String;)V

    :cond_0
    const/4 p1, 0x0

    return p1

    .line 13
    :cond_1
    sget-boolean p3, Ldgb/o0;->c:Z

    if-eqz p3, :cond_2

    .line 14
    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string p4, "start system uninstaller to uninstall package:"

    invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    invoke-static {p3}, Ldgb/s0;->b(Ljava/lang/String;)V

    :cond_2
    const/4 p3, 0x0

    const-string p4, "package"

    .line 15
    invoke-static {p4, p2, p3}, Landroid/net/Uri;->fromParts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p2

    .line 16
    new-instance p3, Landroid/content/Intent;

    const-string p4, "android.intent.action.DELETE"

    invoke-direct {p3, p4, p2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    const/high16 p2, 0x10000000

    .line 17
    invoke-virtual {p3, p2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 18
    invoke-virtual {p1, p3}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    const/4 p1, 0x1

    return p1
.end method
